Crate conpty

source ·
Expand description

A library which provides an interface for ConPTY.

use std::io::prelude::*;

let mut proc = conpty::spawn("echo Hello World").unwrap();
let mut reader = proc.output().unwrap();

let mut buf = [0; 1028];
let n = reader.read(&mut buf).unwrap();

assert!(String::from_utf8_lossy(&buf).contains("Hello World"));

Modules

  • Module contains a handy functions for terminal.
  • Module contains a library error.
  • This module contains crate::Process’s Input and Output pipes.

Structs

  • The structure is resposible for interations with spawned process. It handles IO and other operations related to a spawned process.

Functions

  • Spawns a command using cmd.exe.